import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../views/login.vue'
import Home from '../views/HomeView.vue'
import Users from '../views/user/Users.vue'
import Rights from '../views/auth/Rights.vue'
import Roles from '../views/auth/Roles.vue'
import Goods from '../views/goods/Goods.vue'
import Categories from '../views/goods/Categories.vue'
import Params from '../views/goods/Params.vue'
import Orders from '../views/orders/Orders.vue'
import Report from '../views/report/Reports.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: login
  },
  {
    path: '/login',
    name: 'login',
    component: login
  },
  {
    path: '/home',
    component: Home,
    children:[
      {path:'/users',component:Users},
      {path:'/rights',component:Rights},
      {path:'/roles',component:Roles},
      {path:'/goods',component:Goods},
      {path:'/categories',component:Categories},
      {path:'/params',component:Params},
      {path:'/orders',component:Orders},
      {path:'/reports',component:Report},
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
